package com.itheima.day20.demo07.接口回调;

public class Employee {
    private CallBackInterface callBackInterface;

    public CallBackInterface getCallBackInterface() {
        return callBackInterface;
    }

    public void setCallBackInterface(CallBackInterface callBackInterface) {
        this.callBackInterface = callBackInterface;
    }

    public void work() {
        System.out.println("Employee working.....");
        int result = 0;
        for (int i = 0; i < 10; i++) {
            result += i;
        }
        callBackInterface.call(result);
    }
}
